code = \
"""
n = 3650
w_energy = 100
wlist =[]
g_energy = 100
glist = []
for i in range(n):
    g_energy = g_energy * 1.001
    glist.append(g_energy)
    b = i % 5
    if b<3:
        w_energy = w_energy * 1.002
        wlist.append(w_energy)
    else:
        w_energy = w_energy * 0.999
        wlist.append(w_energy)
from matplotlib import pyplot as plt
plt.plot(range(n),glist,label ="guo")
plt.plot(range(n),wlist,label = "wang")
plt.text(0,2500,s)
plt.show()
"""
n = 3650
a =100
w_energy = a
wlist =[]
g_energy = a
glist = []
for i in range(n):
    g_energy = g_energy * 1.001
    glist.append(g_energy)
    b = i % 5
    if b<3:
        w_energy = w_energy * 1.002
        wlist.append(w_energy)
    else:
        w_energy = w_energy * 0.999
        wlist.append(w_energy)

from matplotlib import pyplot as plt
plt.plot(range(n),glist,label ="guo master")
plt.plot(range(n),wlist,label = "wang master")
plt.text(0,110,code,fontsize = "small")
plt.title('guo vs. wang')
plt.xlabel("days")
plt.ylabel("energy")
plt.legend()
plt.show()
